package com.esun.payment_api.mapper;

import com.esun.payment_api.bean.SumDkReceiveMoneyBean;
import com.esun.payment_api.dao.FkDraftDao;
import com.esun.payment_api.dao.FkDraftDetail;
import com.esun.payment_api.domain.FkDraft;
import com.esun.payment_api.domain.FkDraftExample;
import java.util.List;

import com.esun.payment_api.dto.FkDraftQueryParam;
import com.esun.payment_api.dto.PInvInsParam;
import org.apache.ibatis.annotations.Param;

public interface FkDraftMapper {
    long countByExample(FkDraftExample example);

    int deleteByExample(FkDraftExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(FkDraft record);

    int insertSelective(FkDraft record);

    List<FkDraft> selectByExample(FkDraftExample example);

    FkDraft selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") FkDraft record, @Param("example") FkDraftExample example);

    int updateByExample(@Param("record") FkDraft record, @Param("example") FkDraftExample example);

    int updateByPrimaryKeySelective(FkDraft record);

    int updateByPrimaryKey(FkDraft record);

    //删除，调用存储过程
    void pFkDelete(@Param("param") PInvInsParam param);
    //根据id删除
    int deleteById(Integer id);
    //创建数据，并返回实体
    int insertReturnId(FkDraft fkDraft);
    //通过id获取汇票付款详情信息
    FkDraftDetail getFkDetail(@Param("userId") Short userId, @Param("id") Integer id);
    //根据汇票付款类型查询
    List<FkDraftDao> getListByType(@Param("queryParam") FkDraftQueryParam queryParam);
    //按筛选条件，计算：已兑票据金额
    SumDkReceiveMoneyBean getSumMoneyBySearch(@Param("queryParam") FkDraftQueryParam queryParam);
    //提交审批
    void fkSubmitApproval(Short coId, String uuid, Integer fkId, Short userId, Short deptId, String flowTypeName);
    //被拒后重新提交审批
    void fkResubmitApproval(Short coId, String uuid, Integer fkId, Short userId, Short deptId, String flowTypeName);
    //审批 同意1 拒绝-1
    void fkProcessApproval(Short status, Integer flowId, String flowNotes, Short userId, Integer fkId);
    //校验发票提交申请
    String checkFkSubmit(@Param("id") Integer id);

}